names = ['麦克斯','卡洛琳','憨','奥列格','苏菲']
rename = []
i = list(input("请输入想要查找重名的名字(以空格间隔):").split())

names.extend(i)
for i in names:
    
    
    if not i in names:
        
        print("没有发现重名")
    else:
        time = names.count(i)
        rename.extend(i)
        
        print("出现了%d次重名"%time)
    
